When a person takes a commemorative photograph at a holiday resort, for example, moving objects such as other people or cars may enter the frame in addition to the photographic subject, so it is difficult to take a photograph in suitable conditions, i.e. a condition in which only a photographic subject is present in the frame. There are conventional techniques for this problem, such as those disclosed in Patent Document 1 and Patent Document 2, which solve the problem by taking an image of an identical scene plural times, and extracting supposedly optimal parts and compositing them with each other.